<html>  
  <head>  
        <meta charset="utf-8">  
        <title>5.3.1 绘制坐标轴</title>  
  </head>
<style>
.axis path,
.axis line{
	fill: none;
	stroke: black;
	shape-rendering: crispEdges;
}
 
.axis text {
	font-family: sans-serif;
	font-size: 11px;
}
</style>
<body>

<script src="../../d3/d3.min.js" charset="utf-8"></script> 
<script>  

var width = 600;
var height = 600;

var svg = d3.select("body").append("svg")
				.attr("width",width)
				.attr("height",height);

var xScale = d3.scale.linear()
				.domain([0,10])
				.range([0,300]);
				

var axis = d3.svg.axis()
				.scale(xScale)
				.orient("bottom");
				
var gAxis = svg.append("g")
			.attr("transform","translate(80,80)");
			
gAxis.attr("class","axis");
			
//axis(gAxis);

gAxis.call(axis);
	
</script> 

</body>

</html>